package com.zulucap.riftcalc;

import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.zulucap.R;

public class NewBuildActivity extends BaseActivity {
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.new_build);
        
        // Set custom font 
        TextView tv=(TextView)findViewById(R.id.text_calling);
        Button cleric = (Button) findViewById(R.id.button_cleric);
        Button mage = (Button) findViewById(R.id.button_mage);
        Button rogue = (Button) findViewById(R.id.button_rogue);
        Button warrior = (Button) findViewById(R.id.button_warrior);
    	 
        face=Typeface.createFromAsset(getAssets(), "fonts/CrimsonText-Roman.ttf"); 
    	faceBold = Typeface.createFromAsset(getAssets(), "fonts/CrimsonText-Bold.ttf");
    	
    	tv.setTypeface(faceBold);
    	cleric.setTypeface(face);
    	mage.setTypeface(face);
    	rogue.setTypeface(face);
    	warrior.setTypeface(face);
    	
    	// Handle Button Clicks
    	Button btn1 = (Button) findViewById(R.id.button_cleric);
    	Button btn2 = (Button) findViewById(R.id.button_mage);
    	Button btn3 = (Button) findViewById(R.id.button_rogue);
    	Button btn4 = (Button) findViewById(R.id.button_warrior);

    }

    public void openBuild(View view){
    	String calling = "";
    	Intent i = new Intent(getApplicationContext(), BuildActivity.class);
        
        switch (view.getId()){
        	case R.id.button_cleric:
        		calling = "Cleric";
        		break;
        
        	case R.id.button_mage:
        		calling = "Mage";
        		break;
        
	        case R.id.button_rogue:
        		calling = "Rogue";
	        	break;
        	
	        case R.id.button_warrior:
        		calling = "Warrior";
	        	break;
        }
        
        i.putExtra("calling", calling);

        startActivity(i);
        
        this.finish();
    }
}
